package craky.keeper.house;

import javax.swing.JComponent;

import craky.keeper.KeeperApp;
import craky.keeper.KeeperMgr;
import craky.keeper.KeeperPane;
import craky.keeper.allpay.AllPay;

public class HousePane extends KeeperPane {
	private static final long serialVersionUID = -6547714216522529561L;
	public static final String TYPE = "住房";

	public HousePane(KeeperApp keeper, KeeperMgr mgr) {
		super(keeper, mgr);
		setImageOnly(true);
	}

	@Override
	protected JComponent createCenter() {
		super.createCenter();
		this.table.getColumnModel().removeColumn(
				this.table.getColumnModel().getColumn(3));
		return this.center;
	}

	@Override
	protected JComponent createBottom() {
		super.createBottom();
		this.ecType.setVisible(false);
		return this.bottom;
	}

	@Override
	protected JComponent createTop() {
		super.createTop();
		this.ecFType.setVisible(false);
		return this.top;
	}

	@Override
	protected void resetRowValues(AllPay pay) {
		super.resetRowValues(pay);
		pay.setType("住房");
	}

	@Override
	public String getType() {
		return "住房";
	}
}